<?php

namespace Database\Factories;

use App\Models\User;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\Factory;

class UserFactory extends Factory
{
    protected $model = User::class;
    
    public function definition()
    {
	    return [
		    'parent_id' => 0,
		    'grade' => $this->faker->randomElement(['normal', 'vip', 'tvip']),
		    'phone' => $this->faker->phoneNumber,
		    'name' => $this->faker->name,
		    'password' => bcrypt(123456),
		    'invite_code' => $this->faker->unique()->randomNumber()
	    ];
    }
}
